<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<script>
					function shuaige(){
					var a=window.prompt("请输入第一个数字:")
					var por=window.prompt("请输入运算符:")
					var b=window.prompt("请输入第二个数字:")
					var result;
					a=parseFloat(a);
					b=parseFloat(b);
					switch(por){
						case "+":
							result=window.document.write("运算结果为:"+"<br />"+a+"+"+b+"="+(a+b));
							break;
						case "-":
							result=window.document.write("运算结果为:"+"<br />"+a+"-"+b+"="+(a-b));
							break;
						case "*":
							result=window.document.write("运算结果为:"+"<br />"+a+"*"+b+"="+(a*b));
							break;
						case "/":
							result=window.document.write("运算结果为:"+"<br />"+a+"/"+b+"="+(a/b));
							break;
						default:
							break;
					}
				}
				</script>
	</head>
	<body>
		<input type="button" value="点我进行两个数字的运算" onclick="shuaige()"/>
	</body>
</html>
